package com.hzsai.controller;

import com.hzsai.service.Impl.ScheduledServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * hzsai 2019/8/1
 * usage:
 **/
@Api(tags = "定时人任务")
@RestController
@RequestMapping("/schedule")
public class ScheduledController {

    @Autowired
    private ScheduledServiceImpl service;

    @ApiOperation(value = "Job 1")
    @PostMapping("/job1")
    public void job1() {
        service.job1();
    }

    @ApiOperation(value = "Job 2")
    @PostMapping("/job2")
    public void job2() {
        service.job2();
    }
}
